//
//  AppManager.m
//  OSChina
//
//  Created by xiongzenghui on 14/12/30.
//  Copyright (c) 2014年 Zain. All rights reserved.
//

#import "AppManager.h"

@implementation AppManager

+ (instancetype)sharedManager {
    static AppManager *manager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        manager = [[AppManager alloc] init];
    });
    return manager;
}

- (instancetype)init {
    self = [super init];
    if (!self) {
        return nil;
    }
    
    //TODO: 单例对象创建
    _netEngine = [[NetEngine alloc] initWithHostName:HostName];
    [_netEngine useCache];
    _netEngine.reachabilityChangedHandler = ^(NetworkStatus status) {
        NSLog(@"当前网络状态 = %ld\n" , status);
    };
    
    return self;
}

@end
